package com.xmall.controller.wx;


import com.xmall.bean.table.Storage;
import com.xmall.bean.vo.BaseRespVo;
import com.xmall.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("wx/storage")
public class StorageWeChatController {
    @Autowired
    StorageService storageService;

    @RequestMapping("upload")
    public BaseRespVo uploadInStorage(MultipartFile file){
        Storage storage = storageService.createStorage(file);
        return BaseRespVo.ok(storage);
    }

}
